<page-header *ngIf="!agentId" [autoTitle]="false"></page-header>
<nz-card [nzBordered]="!agentId">
  <section class="search-section">
    <input nz-input placeholder="备注说明" [(ngModel)]="keyword" class="search-item"/>
    <button nz-button [nzType]="'primary'" nzGhost (click)="search()"  class="search-item">
      <i class="anticon anticon-search"></i><span>搜索</span>
    </button>
  </section>
  <nz-table #nzTable [nzData]="page.content"
            [nzPageSize]="page.size"
            [nzTotal]="page.totalElements"
            [nzFrontPagination]="false"
            [(nzPageIndex)]="page.number"
            (nzPageIndexChange)="changePageNo($event)"
            [nzLoading]="isLoading">
    <thead>
    <tr>
      <th nz-th><span>序号</span></th>
      <th nz-th><span>类型</span></th>
      <th nz-th><span>金额(￥)</span></th>
      <th nz-th><span>操作前余额</span></th>
      <th nz-th><span>操作后余额</span></th>
      <th nz-th><span>备注说明</span></th>
      <th nz-th><span>操作时间</span></th>
      <!--<th nz-th><span>操作</span></th>-->
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let data of nzTable.data;let i=index">
      <td>
        {{i+1}}
      </td>
      <td>{{data.type|dicsNamePipe:financesType}}</td>
      <td>{{(data.type == 1||data.type ==3)?'-':'+'}}{{data.amount}}</td>
      <td>{{data.oldBalance}}</td>
      <td>{{data.newBalance}}</td>
      <td *ngIf="data.type == 3 || (data.type ==2&&data.inType!=3)">{{data.remark}}</td>
      <td *ngIf="!(data.type == 3 || (data.type ==2&&data.inType!=3))"><a href="javascript:void (0);" title="点击查看订单详情" (click)="seeEntity(data)"><span *ngIf="data.type == 2 && data.inType == 3">{{data.inType|dicsNamePipe:FinancesInType}}-</span>{{data.remark}}</a></td>
      <td>{{data.doTime}}</td>
    </tr>
    </tbody>
  </nz-table>
</nz-card>
